import org.junit.Test;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: robert.song
 * @Date: Created in 2021/7/19
 */
public class test {
    private int i = 1;
    @Resource
    private DiscoveryClient discoveryClient;
    @Test
    public void test1(){
        List<ServiceInstance> instances = discoveryClient.getInstances("CLOUD-PAYMENT-SERVICE");
    }
}
